﻿
Public Class frmReportCurrentInv
    Dim _mysql As New ClsSQLhelper
    Dim Strsql As String

    Private Sub frmReportCurrentInv_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Strsql = "Select items.*,typeitem.Type_Name,department_name,section_name,categories.cate_name from items "
        Strsql = Strsql & " left join typeitem on items.Item_Type = typeitem.Type_ID "
        Strsql = Strsql & " left join department on items.Department = department.department_ID "
        Strsql = Strsql & " left join sections on typeitem.section = sections.section_ID "
        Strsql = Strsql & " left join categories on sections.Cate_ID = categories.Cate_ID "
        Strsql = Strsql & " where discharge <> 'Y'"
        Dim DS_Whas As New DataSet
        DS_Whas = _mysql.GetMYSQLDataset(Strsql, "items")
        Report1.RegisterData(DS_Whas)
        Report1.Refresh()
        Report1.Design()
    End Sub
End Class